import { GET, POST } from '@/utils/request'

const conf = window.conf;
const accessDomin = conf.domain1;
const assetDomin = conf.domain;
const sourceDomin = conf.domain3;

// 根据类型查询单条存储区信息
export function getDatabaseInfoById (params) {
  return GET(`${accessDomin}/base-unified-access/access/v1/db/getOne`, params);
}
// 查询对账单list
export function getlist (data) {
  return POST(`${accessDomin}/base-unified-access/access/v1/account/selectStatementAccount`, data);
}
// 根据任务id-获得对账单详细
export function getTableAccountList (data) {
  return POST(`${accessDomin}/base-unified-access/access/v1/account/getTableAccountList`, data);
}

// 对账详情展示
export function statementAccountDetail (data) {
  return POST(`${accessDomin}/base-unified-access/access/v1/account/statementAccountDetail`, data);
}

// 销账
export function clearStatement (data) {
  return GET(`${accessDomin}/base-unified-access/access/v1/account/clearStatement`, data);
}

/** *********任务调度*********** */

// 列表查询
export function monitorSchedulerQuery (data) {
  return POST(`${accessDomin}/base-unified-access/access/v1/monitor/monitorSchedulerQuery`, data);
}
// 启动任务
export function startJob (data) {
  return POST(`${accessDomin}/base-unified-access/access/v1/monitor/startJob`, data);
}
// 暂停任务
export function stopJob (data) {
  return POST(`${accessDomin}/base-unified-access/access/v1/monitor/stopJob`, data);
}
// 废止任务
export function annulJob (data) {
  return POST(`${accessDomin}/base-unified-access/access/v1/monitor/annulJob`, data);
}
// 重新汇聚
export function convergeJob (data) {
  return POST(`${accessDomin}/base-unified-access/access/v1/monitor/convergeJob`, data);
}

// 资产-数据源查询复制
export function dataSource (dataSourceid) {
  return GET(`${assetDomin}/asset/v1/dataSourceOperate/dataSource/${dataSourceid}`);
}

// 资产-查询业务系统
export function getBusinessList () {
  return GET(`${assetDomin}/asset/v1/feign/query/queryAllBusinessSystemName`);
}

// 统一字典
// export function getselectAccessDictionary (params) {
//   return GET(`10.19.151.108:29620/register/selectAccessDictionary/${params}`);
// }
// 统一字典
export function getselectAccessDictionary (data) {
  return POST(`${assetDomin}/asset/v1/redis/getList`, data);
}

// 测试连接-source工程
export function datasourceConnect (data) {
  return POST(`${sourceDomin}/register/dataSourceConnect`, data);
}
